#!/usr/bin/env python3
import os
import time
import configparser

config = configparser.ConfigParser()
config.read('/usr/share/urukUpdater/config.conf')
timer=int(config['CONFVAL']['time_refresh'])

while(True):
    os.system('sudo /usr/lib/urukUpdater/checker')
    os.system('CHECK="$(date +\'%d/%m/%Y %T\')" && printf "Update check done at %s\n" "$CHECK" >> /tmp/urukupdater.log')
    time.sleep(timer)
